<template>
  <!-- 购车测算 -->
  <view class="container">
    <view class="bgimg">
      <image src="https://files.yzsheng.com/client/commodity/cesuanbanner@2x.png"></image>
    </view>
    <view class="headbox flex flex-ai-c flex-jc-sb" @click="returnpage">
      <view class="uiconcss">
        <u-icon class="uiconone" name="arrow-left" color="#ffffff" size="34rpx"></u-icon>
      </view>
    </view>
    <view class="complete">
      <view class="cpbox font-24">
        已有99999+人完成检查
      </view>
    </view>
    <!-- 去添加 -->
    <view class="addcar flex flex-ai-c flex-jc-c flex-dir-c" v-if="addComplete.carbrand === ''">
      <view class="addcarbox">
        <image src="https://files.yzsheng.com/client/comparison/images/che.png" mode=""></image>
      </view>
      <view class="addbtn font-30 color-333 flex flex-ai-c flex-jc-c mt-45" @click="addbrands">
        <view>
          <i-icon icon="icon-tainjia" type="single" size="44rpx" color="#3D3D3D"></i-icon>
        </view>
        <view class="ml-15">去添加</view>
      </view>
    </view>
    <!-- 添加成功 -->
    <view class="addcar flex flex-ai-c flex-jc-c flex-dir-c" v-else>
      <view class="addcarboxzy">
        <image v-if="derfimg" :src="'https://carfiles.yzsheng.com/goodimg/cartypeimg/' + addComplete.image + '.png'" mode="heightFix" @error="imageError"></image>
        <image v-else src="https://files.yzsheng.com/client/comparison/images/che.png"></image>
      </view>
      <view class="font-34 color-333 flex flex-ai-c flex-jc-c mt-20">
        {{addComplete.carbrand}}
      </view>
      <view class="font-26 color-999 flex flex-ai-c flex-jc-c mt-15">
        {{addComplete.carseries}}{{addComplete.toconfigure}}
      </view>
    </view>
    <view class="titlecss">
      提交信息 秒出结果
    </view>
    <view class="submitifm">
      <view class="subifbox">
        <view class="subbox flex flex-ai-c flex-jc-sb font-28 color-333" @tap="showdz = true">
          <view class="subtitle">
            提车城市
          </view>
          <view class="subaddress">
            {{province}} {{city}}
          </view>
          <view class="1234">
            <u-icon name="arrow-right" color="#999999" size="24rpx"></u-icon>
          </view>
        </view>
        <view class="subbox flex flex-ai-c flex-jc-sb font-28 color-333">
          <view class="subtitle" style="letter-spacing:40rpx">
            姓名
          </view>
          <view class="subaddress mr-55">
            <input class="inputname"  placeholder="请输入姓名" maxlength="6" v-model="grname"/>
          </view>
          <view></view>
        </view>
        <view class="subbox flex flex-ai-c flex-jc-sb font-28 color-333">
          <view class="subtitle" style="letter-spacing:15rpx">
            手机号
          </view>
          <view class="subaddress mr-55">
            <input class="inputname" type="number" v-model="mobile"  placeholder="请输入手机号" maxlength="11" @input="InputChildItem($event)"/>
          </view>
          <view></view>
        </view>
        <view class="subbox flex flex-ai-c flex-jc-sb font-28 color-333" v-show="registernot">
          <view class="subtitle" style="letter-spacing:14rpx">
            验证码
          </view>
          <view class="subaddress mr-55" style="width: 220rpx;">
            <input class="inputname" placeholder="请输入验证码" v-model="verificationCode"/>
          </view>
          <view class="getCaptcha" @click="sendCode">
            获取验证码
          </view>
        </view>
      </view>
      <view v-show="registernot">
        <!-- <view v-if="showText" class="misonum font-26 color-999" @click="$u.throttle(sendCode(1), 3000)"></view>
        <view v-else class="misonum">{{second}}s重新发送</view> -->
      </view>
      <view>
        <view class="agreement flex">
          <view class="icons" @click="Agree">
            <!-- 未选择 -->
            <i-icon v-if="isAgree" icon="iconiconfontxuanzhong" type="single" size="36rpx" color="#e1e1e1"></i-icon>
            <!-- 勾选 -->
            <i-icon v-else icon="iconiconfontxuanzhong" type="single" size="36rpx" color="#FBBC00"></i-icon>
          </view>
          <view class="1234">
            我已经阅读并同意 <text @click="gouserAgreementPage">《7迈车购车服务用户使用协议》</text><text @click="gouserAgreementPage">《个人信息披露》</text>
          </view>
        </view>
      </view>
      <view class="gouCar font-30 color-333" @click="askBuyCar">
        立即询比价购车
      </view>
    </view>
    <!-- 车辆所在地-->
    <recom :showdz="showdz" :title="'提车城市'" @close="close" @confirmdz="confirmdz"></recom>
    <!-- 免责弹窗 -->
    <view class="uni-popup" v-if="showPopup">
      <view class="main">
        <view class="heades">
          温馨提示
        </view>
        <view class="neirong">
          请仔细阅读协议哦！
        </view>
        <view class="popup-footer">
          <view class="jkhjkh" @tap="agreepopup(0)">确认</view>
        </view>
      </view>
    </view>
  </view>
</template>

<script src="./carPurchaseCalculation.js"></script>
<style scoped lang="scss">
  @import './carPurchaseCalculation.scss';
</style>
